import aio_pika
from core.Config import settings

async def create_rabbitmq_channel():
    connection = await aio_pika.connect_robust(
        f"amqp://{settings.RABBITMQ_USER}:{settings.RABBITMQ_PASSWORD}@{settings.RABBITMQ_HOST}:{settings.RABBITMQ_PORT}/"
    )
    channel = await connection.channel()
    # 返回 connection 和 channel
    return connection, channel
